﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head><link rel="stylesheet" href="${ctx}/common/common.css">
    <title>Title</title>
    <link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/style/admin.css" media="all">
    <script src="${ctx}/common/plugins/layuiadmin/layui/layui.js"></script>
    
</head>
<body>
<form class="layui-form" action="${ctx}/role/${action}" style="margin-top: 50px">
    <input type="hidden" name="id" value="${entity.id}" />
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">角色名称</label>
        <div class="layui-input-block">
        <input type="text" name="name" required value="${entity.name}" disabled autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">角色编码</label>
        <div class="layui-input-block">
        <input type="text" name="code" disabled value="${entity.code}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <%-- <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">数据权限</label>
        <div class="layui-input-block">
	        <c:if test="${entity.dataPermissions eq '0'}">
	        	<input type="text" name="dataPermissions" disabled value="全部" autocomplete="off" class="layui-input">
	        </c:if>
	        <c:if test="${entity.dataPermissions eq '1'}">
	        	<input type="text" name="dataPermissions" disabled value="本部门" autocomplete="off" class="layui-input">
	        </c:if>
	        <c:if test="${entity.dataPermissions eq '2'}">
	        	<input type="text" name="dataPermissions" disabled value="自己" autocomplete="off" class="layui-input">
	        </c:if>
        </div>
    </div> --%>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <input type="text" name="described" disabled value="${entity.described}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">所含权限</label>
       	<c:set value="" var="sumName"/>
           <c:forEach items="${funList}" var="f" varStatus="vs">
           	<c:if test="${vs.last eq false}">
	        <c:set value="${sumName +=f.name}" var="sumName"/>
	        <c:set value="${sumName +=','}" var="sumName"/>
	        </c:if>
	        <c:if test="${vs.last eq true}">
	        <c:set value="${sumName +=f.name}" var="sumName"/>
	        </c:if>
           </c:forEach>
        <div class="layui-input-block">
            <input type="text" name="described" disabled value="${sumName}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">创建人</label>
        <div class="layui-input-block">
            <input type="text" name="described" disabled value="${entity.creatorName}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-col-md5">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input type="text" name="described" disabled value="<fmt:formatDate value='${entity.createTime}' pattern="yyyy-MM-dd HH:mm:ss"/>" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn layui-btn-primary reback-btn">返回</button>
        </div>
    </div>
</form>

<script>
layui.use('layer', function(){
	  var $ = layui.$
	  ,layer = layui.layer;
	  
 	$('.reback-btn').on("click",function(){
 		history.go(-1);
 	});
});
    
</script>
</body>
</html>



